function types() {
    var typeone=$('.selects');
    var typeids=$('.typeidss');
    for (var i=0;i<typeone.length;i++){
        console.log($(typeone[i]));
        if ($(typeids[i]).val() == $('.typtids').val()){
            $(typeone[i]).addClass('selected');
            $('.selectall').removeClass('selected');
        }else {
            $(typeone[i]).removeClass('selected');
        }
    }
}
types();